package com.situ.allaia.dao;

import com.situ.allaia.model.Good;
import com.situ.allaia.model.GoodSearchBean;
import org.apache.ibatis.annotations.Mapper;

import java.util.Collection;
import java.util.List;

@Mapper
public interface GoodDao {
    List<Good> findByCategoryId(Integer id);

    //物理删除
    int deleteByPrimaryKey(Integer id);

    int deleteByIds(Collection<Integer> ids);

    int insert(Good record);

    int insertSelective(Good record);

    default Good findById(Integer id) {
        return selectByPrimaryKey(id);
    }

    List<Good> findAll(GoodSearchBean gsb);

    Good selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Good record);

    int updateByPrimaryKey(Good record);

}
